1. Field of the Invention
The present invention relates to a microcomputer unit, more particularly to a microcomputer unit having a monitoring function wherein the content of an arbitrarily specified register in the microcomputer unit can be read externally without changing the internal status of the computer system.
2. Description of the Prior Art
A microcomputer unit, especially a single chip microcomputer unit, is usually provided with a so-called HALT terminal or, similarly, a so-called SINGLE-STEP terminal. Application of a corresponding signal to such a HALT terminal (hereinafter only the former terminal is mentioned) momentarily stops the operation of the computer. During the halt time, the content of a specified register at the time of the stopping of the operation is externally read outside the microcomputer unit. The read content can be used for monitoring the internal status in the single chip microcomputer unit, for example, for debugging of a program.
In the prior art, the content of a specified register is read by running or executing instructions in the computer system. First, a read instruction for the specified register is externally supplied to the microcomputer unit. Then, a central processing unit (CPU) executes a corresponding read operation to transfer the content of the specified register to a predetermined port of the microcomputer unit. Since the read instruction is executed while the CPU is running, however, the opertion or states of the computer unnecessarily advance several steps during the execution of the read instruction. This makes it impossible to read the content of the register at the moment when the read instruction is supplied. This is a first defect of the prior art.
Further, in the above-mentioned monitoring operation, the read instruction is usually applied to an interrupt (INT) terminal of the microcomputer unit. Accordingly, if such an INT terminal is occupied by a user program, there is no inlet for supplying such a read instruction. This is a second defect of the prior art.